﻿<html>
<head>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
</head>
<body>
<style>
fieldset {margin-top:1em}
legend {font-size:1.5em;font-weight:bold}        
</style>

    <h1>RainbowMiner API</h1>

    API data is available at <span id="res">http://localhost:4000/&lt;resource&gt;</span>

    <fieldset>
    <legend>Common Resources</legend>

    <h3>Version</h3>
    <a href="http://localhost:4000/version">/version</a>
    <p>Returns the version number of RainbowMiner.</p>    

    <h3>Config</h3>
    <a href="http://localhost:4000/config">/config</a>
    <p>Shows the full configuration for the running script, after all variable substitution and pool entries are added</p>

    <h3>Computer Stats</h3>
    <a href="http://localhost:4000/computerstats">/computerstats</a>
    <p>Shows current computer stats</p>

    <h3>Rates</h3>
    <a href="http://localhost:4000/rates">/rates</a>
    <p>Shows current bitcoin exchange rates</p>

    </fieldset><fieldset>
    <legend>Miner Resources</legend>

    <h3>Miner</h3>
    <a href="http://localhost:4000/miners">/miners</a>
    <p>Dump of the $Miners variable</p>

    <h3>Running Miners</h3>
    <a href="http://localhost:4000/runningminers">/runningminers</a>
    <p>Shows data about the miners that are currently running.</p>

    <h3>Active Miners</h3>
    <a href="http://localhost:4000/activeminers">/activeminers</a>
    <p>Shows data about all miners that are enabled.</p>

    <h3>Fastest Miners</h3>
    <a href="http://localhost:4000/fastestminers">/fastestminers</a>
    <p>Shows data about the fastest miners (requires 'UseFastestMinerPerAlgoOnly = $true', otherwise will be identical to 'Miners'; see readme).</p>

    <h3>Failed Miners</h3>
    <a href="http://localhost:4000/failedminers">/failedminers</a>
    <p>Shows data about all miners that are failed.</p>

    <h3>Miner Benchmark Stats</h3>
    <a href="http://localhost:4000/minerstats">/minerstats</a>
    <p>Shows the benchmark status of all miners</p>

    <h3>Current Profit</h3>
    <a href="http://localhost:4000/currentprofit">/currentprofit</a>
    <p>Shows the running miner's current profit.</p>

    <h3>Last Activity</h3>
    <a href="http://localhost:4000/activity">/activity</a>
    <p>Shows a list of all active miners over the past three days</p>

    </fieldset><fieldset>
    <legend>Pool Resources</legend>

    <h3>Pools</h3>
    <a href="http://localhost:4000/pools">/pools</a>
    <p>Dump of the $Pools variable</p>

    <h3>Pool Balances</h3>
    <a href="http://localhost:4000/balances">/balances</a>
    <p>Shows the balances at the pools</p>

    <h3>NewPools</h3>
    <a href="http://localhost:4000/newpools">/newpools</a>
    <p>Dump of the $NewPools variable</p>

    <h3>AllPools</h3>
    <a href="http://localhost:4000/allpools">/allpools</a>
    <p>Dump of the $AllPools variable</p>

    </fieldset><fieldset>
    <legend>Device Resources</legend>

    <h3>Selected Devices</h3>
    <a href="http://localhost:4000/devices">/devices</a>
    <p>Dump of the $Devices variable, used only for debugging. Shows information about selected mining devices, used only for debugging.</p>

    <h3>All Devices</h3>
    <a href="http://localhost:4000/alldevices">/devices</a>
    <p>Dump of the $AllDevices variable, used only for debugging. Shows information about all found mining devices, used only for debugging.</p>

    <h3>Device Groups</h3>
    <a href="http://localhost:4000/devicecombos">/devicecombos</a>
    <p>Show a list of possible device combinations</p>

    </fieldset><fieldset>
    <legend>Algorithm Resources</legend>

    <h3>Algorithms</h3>
    <a href="http://localhost:4000/algorithms">/algorithms</a>
    <p>Shows all algorithms that can be mined with at least one pool</p>

    </fieldset><fieldset>
    <legend>Command Resources</legend>

    <h3>Pause</h3>
    <a href="http://localhost:4000/pause">/pause</a>
    <p>Pause and restart mining</p>

    <h3>Status</h3>
    <a href="http://localhost:4000/status">/status</a>
    <p>Shows the status of mining: true=running, false=paused</p>

    <h3>Update</h3>
    <a href="http://localhost:4000/update">/update</a>
    <p>Update RainbowMiner to the newest release</p>

    <h3>Stop</h3>
    <a href="http://localhost:4000/stop">/stop</a>
    <p>Exit RainbowMiner</p>

    </fieldset><fieldset>
    <legend>Debugging Resources</legend>

    <h3>Debug</h3>
    <a href="http://localhost:4000/debug">/debug</a>
    <p>Shows all data added to the $API hashtable, used only for debugging.</p>

    <h3>Stats</h3>
    <a href="http://localhost:4000/stats">/stats</a>
    <p>Dump of the $Stats variable, used only for debugging. Stats data is used for internal RainbowMiner calculations.</p>

    <h3>WatchdogTimers</h3>
    <a href="http://localhost:4000/watchdogtimers">/watchdogtimers</a>
    <p>Dump of the $WatchdogTimers variable, used only for debugging. WatchdogTimers data is used for internal RainbowMiner calculations.</p>

    <h3>Asynchronous Loader Jobs</h3>
    <a href="http://localhost:4000/asyncloaderjobs">/asyncloaderjobs</a>
    <p>Dump of the $AsyncLoader.Jobs variable, used only for debugging. These are the jobs running in the background.</p>

    <h3>Asynchronous Loader Errors</h3>
    <a href="http://localhost:4000/asyncloadererrors">/asyncloadererrors</a>
    <p>Dump of the $AsyncLoader.Errors variable, used only for debugging. These are the past 50 errors, the jobs running in the background have caused.</p>

    <h3>Miner Ports</h3>
    <a href="http://localhost:4000/minerports">/minerports</a>
    <p>Lists all assigned localhost ports</p>

    </fieldset>
<script>
    $(function () {
        var port = $(location).attr('port')
        $("a").each(function () { $(this).attr('href', $(this).attr('href').replace(':4000', ':' + port)) })
        $("#res").text($("#res").text().replace(':4000', ':' + port))
    })
</script>
</body>
</html>